From: Jyrki Gadinger Date: Tue, 18 Feb 2025 12:12:38 +0000 (+0100) Subject: check for need of signing TOS during connectivity check X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~44^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=85715efe7017300e8735d6a6691758dee0ca9846;p=nextcloud-desktop.git check for need of signing TOS during connectivity check Signed-off-by: Jyrki Gadinger --- diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp index d167f76f8..a59fed273 100644 --- a/src/gui/accountstate.cpp +++ b/src/gui/accountstate.cpp @@ -222,6 +222,11 @@ bool AccountState::isConnected() const return _state == Connected; } +bool AccountState::needsToSignTermsOfService() const +{ + return _state == NeedToSignTermsOfService; +} + void AccountState::tagLastSuccessfullETagRequest(const QDateTime &tp) { _timeOfLastETagCheck = tp; @@ -316,7 +321,7 @@ void AccountState::checkConnectivity() _connectionErrors.clear(); connect(conValidator, &ConnectionValidator::connectionResult, this, &AccountState::slotConnectionValidatorResult); - if (isConnected()) { + if (isConnected() || needsToSignTermsOfService()) { // Use a small authed propfind as a minimal ping when we're // already connected. conValidator->checkAuthentication(); diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h index de4311dbe..0d52f7787 100644 --- a/src/gui/accountstate.h +++ b/src/gui/accountstate.h @@ -127,6 +127,8 @@ public: bool isConnected() const; + bool needsToSignTermsOfService() const; + /** Returns a new settings object for this account, already in the right groups. */ std::unique_ptr settings();